<template>
    <div>
        回单号是:{{transaction}}
        <br>
        订单号是:{{order_on}}
        <br>    
        <button @click="pay">点击去支付</button>
        <br>
        <br>
        
    </div>
</template>

<script>
    export default {
        data() {
            return {
                transaction:'',
                order_on:this.$route.query.order_on
            }
        },
        methods: {
            pay(){
                this.$axios.get('/payment/').then(res=>{
                    this.transaction = res.data.transaction
                    this.$axios.get('/huipay/?transaction='+this.transaction+'&order_on='+this.order_on).then(res=>{
                        if(res.data.code == 200){
                            alert(res.data.mas)
                        }
                    })

                })
            }
        },
    }
</script>

<style scoped>

</style>